<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title th:if="${typeid}==3"> 商品入库</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/css/font-awesome.css}" rel="stylesheet">

    <link th:href="@{/css/plugins/sweetalert/sweetalert.css}" rel="stylesheet">
    <link th:href="@{/css/plugins/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">

    <link th:href="@{/css/animate.css}" rel="stylesheet">
    <link th:href="@{/css/style.css}" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <form th:action="@{/stock/addStockIn}" method="post">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5 th:switch="${typeid}">
                            <span th:case="3">商品入库</span>
                        </h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">单据搜索：</label>
                            <div class="col-sm-9">
                                <div class="input-group">
                                    <input type="text" hidden th:value="${typeid}" id="typeid">
                                    <input type="text" hidden th:value="${status}" id="status">
                                    <input type="text" id="rno" style="width: 33%" placeholder="单据编号" class="form-control">
                                    <input type="date" id="startDate" class="form-control" style="width: 33%" placeholder="开始时间">
                                    <input type="date" style="width: 33%"  class="form-control" id="endDate" placeholder="截止时间">
                                    <span class="input-group-btn">
                                            <button type="button" class="btn btn-primary" id="search">搜索</button>
                                    </span>
                                    <span class="input-group-btn">
                                            <button type="button" id="stockIn" class="btn btn-primary" data-toggle="modal" data-target="#myModal5">商品入库
                                            </button>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <table id="exampleTableEvents" data-height="204" data-mobile-responsive="true" class="text-center table">
                            </table>
                            <input type="text" hidden name="rid" id="rid">
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">库存类型：</label>

                            <div class="col-sm-10">
                                <label>
                                    <input type='text' disabled class='form-control' value="超市" style="text-align: center"  />
                                </label>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">商品</label>
                            <div class="col-sm-9" id="box">
                                <div class="row">
                                    <div class="col-xs-6">
                                        <h3 class="text-center">商品名称</h3>
                                    </div>
                                    <div class="col-xs-2">
                                        <h3 class="text-center">数量</h3>
                                    </div>
                                    <div class="col-xs-2">
                                        <h3 class="text-center">生产日期</h3>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="modal inmodal fade" id="myModal5" tabindex="-1" role="dialog"  aria-hidden="true" backdrop="static">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="title">新增入库商品</h4>
            </div>
            <div class="modal-body" style="background-color: #FFF;">
                <div class="row form-body form-horizontal m-t">
                    <div class="col-md-12">
                        <form id="myform">
                            <input type="text" hidden id="gid" name="gid">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品名：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="name" id="name" class="form-control" placeholder="请输入商品名">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品进价：</label>
                                <div class="col-sm-6">
                                    <input type="text" id="price" class="form-control" name="price" placeholder="请输入商品进价">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品描述：</label>
                                <div class="col-sm-6">
                                    <input type="text" id="details" class="form-control" name="details" placeholder="请输入商品描述">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品分类：</label>
                                <div class="col-sm-6">
                                    <select class="form-control" name="gcid" id="gcid">
                                        <option value="0" >请选择商品分类</option>
                                        <option th:each="gc : ${gcs}" th:value="${gc.gcid}" th:text="${gc.gcname}"></option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品图片：</label>
                                <div class="col-sm-6">
                                    <input type="text" id="img" name="img" hidden>
                                    <input type="file" name="file" id="pic" class="form-control">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品规格：</label>
                                <div class="col-sm-6">
                                    <input type="text" id="specification" class="form-control" name="specification" placeholder="请输入商品规格">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品供应商：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="manufacturer" id="manufacturer" class="form-control" placeholder="请输入供应商">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">商品售价：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="SellingPrice" id="SellingPrice" class="form-control" placeholder="请输入商品售价">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">入库数量：</label>
                                <div class="col-sm-6">
                                    <input type="text" name="StorageQuantity" id="StorageQuantity" class="form-control" placeholder="请输入入库数量">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">生产日期：</label>
                                <div class="col-sm-6">
                                    <input type="date" name="productDate" id="productDate" class="form-control" placeholder="请输入生产日期">
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="btn-submit">保存</button>
            </div>
        </div>
    </div>

</div>

<!-- 全局js -->
<script th:src="@{/js/jquery-3.6.3.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>

<!-- 自定义js -->
<script th:src="@{/js/content.js}"></script>

<!-- Bootstrap table -->
<script th:src="@{/js/plugins/bootstrap-table/bootstrap-table.min.js}"></script>
<script th:src="@{/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js}"></script>
<script th:src="@{/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}"></script>
<script th:src="@{/js/plugins/sweetalert/sweetalert.min.js}"></script>

<script th:src="@{/js/demo/stockIn.js}"></script>


</body>

</html>
